package bubbleFishBob.gameobjects;

import java.awt.Point;
import java.io.File;
import java.util.List;
import java.util.Random;
import java.util.zip.DataFormatException;

import bubbleFishBob.utilities.FileReader;

import com.golden.gamedev.Game;

@SuppressWarnings("serial")
public class PathObject extends AbstractGameObject {

    private FileReader myReader;
    private int myPathPoint;

    public PathObject(Game game)
    {
        super(game);
        try {
            super.readAndSetImages(new File("bin/bubbleFishBob/resources/images/bubble"));
        } catch (DataFormatException e) {
            e.printStackTrace();
        }

        this.setImageToRandomBubble();
        this.setToInitialLocation();
    }

    private void setToInitialLocation() {

        myPathPoint = 0;
        //        this.setLocation(myPath.get(0).x, myPath.get(0).y);

    }

    /**
     * Randomly selects a color image for the path object
     * Sets sprites image
     */
    private void setImageToRandomBubble()
    {
        Random random = new Random();
        //	    this.setImage(myImages.get(random.nextInt(myImages.size())));
    }

    private boolean moveCompleted()
    {
        //        return this.getX() == myPath.get(myPathPoint).x && this.getY() == myPath.get(myPathPoint).y;
        return true;
    }


    @Override
    public void update(long elapsedTime)
    {
        //TODO: Animate

        super.update(elapsedTime);
    }

    @Override
    protected void handleUserInput(long elapsedTime) {

    }
}
